jQuery(function(){
	jQuery('#search_block').live('click',function(){
		jQuery('.search_form1').fadeIn();
		jQuery('#search_block').attr('id','search_none');
	});
	jQuery('#search_none').live('click',function(){
		jQuery('.search_form1').fadeOut();
		jQuery('#search_none').attr('id','search_block');
	});
});

$(function(){	
	$(".con-two").hover(function(){
		$(this).find(".txt-two").css("display","block");
		},function(){
			$(this).find(".txt-two").css("display","none");
	});	

});


(function($){
    $.extend($.fn, {
		posfixed: function(configSettings){
            var settings = {
            	direction:"top",
            	type:"while",
            	hide:false,
				distance:0
			};			
			$.extend(settings, configSettings);

			//initial
			if($.browser.msie&&$.browser.version==6.0){
				$("html").css("overflow","hidden");
				$("body").css({
					height:"100%",
					overflow:"auto"
				});
			}
			
			var obj = this;
			var initPos = $(obj).offset().top;
			var initPosLeft = $(obj).offset().left;
			var anchoredPos = settings.distance;

			if(settings.type=="while"){
				if($.browser.msie&&$.browser.version==6.0){
					$("body").scroll(function(event) {
						var objTop = $(obj).offset().top - $("body").scrollTop();
						if(objTop<=settings.distance){
							$(obj).css("position","absolute");
							$(obj).css("top",settings.distance+"px");
							$(obj).css("left",initPosLeft+"px");
						}
						if($(obj).offset().top<=initPos){						
							$(obj).css("position","static");
						}
					});
					
				}else{
					$(window).scroll(function(event) {

						if(settings.direction == "top"){
							var objTop = $(obj).offset().top - $(window).scrollTop();
						
							if(objTop<=settings.distance){
								$(obj).css("position","fixed");
								$(obj).css(settings.direction,settings.distance+"px");
								
							}
							if($(obj).offset().top<=initPos){
								$(obj).css("position","static");
							}
						}else{
							var objBottom = $(window).height() - $(obj).offset().top + $(window).scrollTop() - $(obj).outerHeight() ;
							
							if(objBottom<=settings.distance){
								
								$(obj).css("position","fixed");
								$(obj).css(settings.direction,settings.distance+"px");
								
							}
							if($(obj).offset().top>=initPos){
								$(obj).css("position","static");
							}
						}
						


					});
				}
			}
			
			if(settings.type=="always"){
				if($.browser.msie&&$.browser.version==6.0){
					if(settings.hide){
						$(obj).hide();
					}
					$("body").scroll(function(event) {
						if($("body").scrollTop()>300){
							$(obj).fadeIn(200);
						}else{
							$(obj).fadeOut(200);
						}
					});
					$(obj).css("position","absolute");
					$(obj).css(settings.direction,settings.distance+"px");
					if(settings.tag!=null){
						if(settings.tag.obj!=null){
							if(settings.tag.direction=="right"){
								$(obj).css("left",(settings.tag.obj.offset().left+settings.tag.obj.width()+settings.tag.distance)+"px");
								$(window).resize(function(){
									$(obj).css("left",(settings.obj.tag.offset().left+settings.tag.obj.width()+settings.tag.distance)+"px");
								});
							}else{
								console.log(settings.tag.obj.offset().left-settings.tag.obj.width()-settings.tag.distance);
								$(obj).css("left",(settings.tag.obj.offset().left-$(obj).outerWidth()-settings.tag.distance)+"px");
								$(window).resize(function(){
									$(obj).css("left",(settings.tag.obj.offset().left-$(obj).outerWidth()-settings.tag.distance)+"px");
								});
							}
							
						}else{
							$(obj).css(settings.tag.direction,settings.tag.distance+"px");
						}
					}

				}else{
					if(settings.hide){
						$(obj).hide();
					}
					$(window).scroll(function(event) {
						if($(window).scrollTop()>300){
							$(obj).fadeIn(200);
						}else{
							$(obj).fadeOut(200);
						}
					});
					var objLeft = $(obj).offset().left;

					$(obj).css("position","fixed");
					$(obj).css(settings.direction,settings.distance+"px");
					if(settings.tag!=null){
						if(settings.tag.obj!=null){
							if(settings.tag.direction=="right"){
								$(obj).css("left",(settings.tag.obj.offset().left+settings.tag.obj.width()+settings.tag.distance)+"px");
								$(window).resize(function(){
									$(obj).css("left",(settings.obj.tag.offset().left+settings.tag.obj.width()+settings.tag.distance)+"px");
								});
							}else{
								console.log(settings.tag.obj.offset().left-settings.tag.obj.width()-settings.tag.distance);
								$(obj).css("left",(settings.tag.obj.offset().left-$(obj).outerWidth()-settings.tag.distance)+"px");
								$(window).resize(function(){
									$(obj).css("left",(settings.tag.obj.offset().left-$(obj).outerWidth()-settings.tag.distance)+"px");
								});
							}
							
						}else{
							$(obj).css(settings.tag.direction,settings.tag.distance+"px");
						}
					}
				}
				
				
				
			}
			
			
		}
	});
	
	
})(jQuery);

$(function(){

	$(".advago li").mouseover(function(){
		$(this).css({
			background:"url(/themes/default/images/advbj2.jpg) 0px 0px no-repeat"
			 });
		$(this).find(".ac1").css({
			background:"url(/themes/default/images/ad1.png)"
			 });
		$(this).find(".ac2").css({
			background:"url(/themes/default/images/ad2.png)"
			 });
		$(this).find(".ac3").css({
			background:"url(/themes/default/images/ad3.png)"
			 });
		$(this).find(".ac4").css({
			background:"url(/themes/default/images/ad4.png)"
			 });
		$(this).find(".advbt").css({
			color:"#FFF"
			 });
		$(this).find(".advtxt").css({
			color:"#FFF"
			 });
		$(this).find(".sz").css({
			color:"#ff6240"
			 });	 						
		});
		
		$(".advago li").mouseout(function(){
		$(this).css({
			background:"url(/themes/default/images/advbj1.jpg) 0px 0px no-repeat"
			 });
		$(this).find(".ac1").css({
			background:"url(/themes/default/images/ac1.png)"
			 });
		$(this).find(".ac2").css({
			background:"url(/themes/default/images/ac2.png)"
			 });
		$(this).find(".ac3").css({
			background:"url(/themes/default/images/ac3.png)"
			 });
		$(this).find(".ac4").css({
			background:"url(/themes/default/images/ac4.png)"
			 });
		$(this).find(".advbt").css({
			color:"#727a83"
			 });
		$(this).find(".advtxt").css({
			color:"#999999"
			 });
		$(this).find(".sz").css({
			color:"#4b4b4b"
			 });			 
		});
});

$(function(){

	$(".newsgo li").mouseover(function(){
		$(this).css({
			background:"#ff6d4d"
			 });
		$(this).find(".shijian").css({
			background:"#FFF"
			 });
		$(this).find(".nquan").css({
			border:"solid 2px #ff6d4d"
			 });
 		$(this).find(".yue").css({
			color:"#b5977d"
			 });
		$(this).find(".nri").css({
			color:"#b5977d"
			 });
		$(this).find(".newsbt a").css({
			color:"#FFF"
			 });
		$(this).find(".newstxt").css({
			color:"#FFF"
			 });
		$(this).find(".vwds").css({
			color:"#FFF",
			border:"solid 2px #FFF"
			 });			
		});
		
		$(".newsgo li").mouseout(function(){
		$(this).css({
			background:"#FFF"
			 });
		$(this).find(".shijian").css({
			background:"#ff6d4d"
			 });
		$(this).find(".nquan").css({
			border:"solid 2px #e3dedd"
			 }); 
		$(this).find(".yue").css({
			color:"#FFF"
			 });
		$(this).find(".nri").css({
			color:"#FFF"
			 });
		$(this).find(".newsbt a").css({
			color:"#333"
			 });
		$(this).find(".newstxt").css({
			color:"#999"
			 });
		$(this).find(".vwds").css({
			color:"#b5977d",
			border:"solid 2px #ff6d4d"
			 });
		});
});



$(function(){

	$(".ptds li").mouseover(function(){
		$(this).find(".ba1").css({
			background:"url(/themes/default/images/bb1.png)"
			 });
		$(this).find(".ba2").css({
			background:"url(/themes/default/images/bb2.png)"
			 });
		$(this).find(".ba3").css({
			background:"url(/themes/default/images/bb3.png)"
			 });
		$(this).find(".ba4").css({
			background:"url(/themes/default/images/bb4.png)"
			 });
		$(this).find(".ba5").css({
			background:"url(/themes/default/images/bb5.png)"
			 });
		$(this).find(".ba6").css({
			background:"url(/themes/default/images/bb6.png)"
			 });
		$(this).find(".ba7").css({
			background:"url(/themes/default/images/bb7.png)"
			 });
		$(this).find(".ba8").css({
			background:"url(/themes/default/images/bb8.png)"
			 });
		$(this).find(".ptdsbt").css({
			color:"#ff6d4d"
			 });
		$(this).find(".ptdstxt").css({
			color:"#ff6d4d"
			 });						
		});
		
		$(".ptds li").mouseout(function(){
		$(this).find(".ba1").css({
			background:"url(/themes/default/images/ba1.png)"
			 });
		$(this).find(".ba2").css({
			background:"url(/themes/default/images/ba2.png)"
			 });
		$(this).find(".ba3").css({
			background:"url(/themes/default/images/ba3.png)"
			 });
		$(this).find(".ba4").css({
			background:"url(/themes/default/images/ba4.png)"
			 });
		$(this).find(".ba5").css({
			background:"url(/themes/default/images/ba5.png)"
			 });
		$(this).find(".ba6").css({
			background:"url(/themes/default/images/ba6.png)"
			 });
		$(this).find(".ba7").css({
			background:"url(/themes/default/images/ba7.png)"
			 });
		$(this).find(".ba8").css({
			background:"url(/themes/default/images/ba8.png)"
			 });
		$(this).find(".ptdsbt").css({
			color:"#2d251b"
			 });
		$(this).find(".ptdstxt").css({
			color:"#5f5f5f"
			 });			 
		});
});

$(function(){

	$(".sfsego li").mouseover(function(){
		$(this).css({
			background:"url(/themes/default/images/sfsebj2.png)"
			 });
		$(this).find(".sfsebt").css({
			color:"#FFF"
			 });
		$(this).find(".sfsetxt").css({
			color:"#FFF"
			 });
 		$(this).find(".rdme").css({
			color:"#FFF"
			 });			
		});
		
		$(".sfsego li").mouseout(function(){
		$(this).css({
			background:"url(/themes/default/images/sfsebj1.png)"
			 });
		$(this).find(".sfsebt").css({
			color:"#333"
			 });
		$(this).find(".sfsetxt").css({
			color:"#7d8b95"
			 }); 
		$(this).find(".rdme").css({
			color:"#313c43"
			 });
		});
});